home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / zyxel-1.5 / zyxel-1 / usr / ZyXEL / zvmb < prev    next >
Text File  |  1994-02-08  |  537b  |  33 lines

  1. #!/bin/sh
  2. #
  3. # ZyXEL VoiceMailBox user interface
  4.  
  5. case $# in
  6.     0)  fifo=`ls /usr/ZyXEL/fifo.*|head -1`
  7.     ;;
  8.  
  9.     1)    fifo=/usr/ZyXEL/fifo.$1
  10.     ;;
  11.  
  12.     *)    echo "Usage: $0 [ttySx]"
  13.         exit 1
  14. esac
  15.  
  16. echo "ZyXEL VoiceMailBox user interface - Hit RETURN for MENU"
  17. echo "Use `stty -a|grep intr|sed -e 's/.*intr = \([^;]*\).*/\1/'` to quit"
  18.  
  19. # save TTY state and set to raw mode
  20. save_tty=`stty -g`
  21. stty -icanon min 1
  22.  
  23. (
  24. # tell ZyXEL about my tty name
  25.     echo ">" `tty`
  26.  
  27. # send keyboard input to the FIFO
  28.     cat
  29. ) >$fifo
  30.  
  31. stty $save_tty
  32. exit 0
  33.